package com.cgah

/**
 * Created by IntelliJ IDEA.
 * User: chue
 * Date: 4/15/11
 * Time: 8:36 AM
 * To change this template use File | Settings | File Templates.
 */
class UserUtil {

    static User getUser(def userName, def password) {
        def user = User.findByUsernameAndPassword(userName, password)
        if (!user) {
            user = User.findByEmailAddressAndPassword(userName, password)
        }
        return user;
    }
}
